package com.tencreat.common.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.tencreat.common.core.enums.ImSessionType;
import com.tencreat.common.core.enums.TrueFalseType;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("`im_user_session`")
public class ImUserSession {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Long userId;
    private Long sessionId;
    private ImSessionType sessionType;
    private Long unread;
    private Long lastAck;
    // 会话对方信息
    private String name;
    private Long toId;
    private String avatar;
    private TrueFalseType isTop;
    private LocalDateTime topTime;
    private TrueFalseType isShow;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
}